<template>
  <div class="div">
    <Header3 title="晒单评价"></Header3>
    <div class="pj">
      <div class="pfdiv1">
        <div class="pfdiv2">物流包装</div>
        <van-rate v-model="value1" />
      </div>
      <div class="pfdiv1">
        <div class="pfdiv2">物流速度</div>
        <van-rate v-model="value2" />
      </div>
      <div class="pfdiv1">
        <div class="pfdiv2">客服服务</div>
        <van-rate v-model="value3" />
      </div>
    </div>
    <van-divider
      contentPosition="center"
      customStyle="color: #1989fa;border-color: #1989fa;font-size: 18px;"
    ></van-divider>
    <div class="spqddiv" v-for="(item,index) in list" :key="index">
      <pjitem :time="time" :name="item.name" :colour="item.colour" :memory="item.memory"></pjitem>
    </div>
  </div>
</template>
<script>
import Header3 from "@/components/Headergl/Header3";
import { mapState, mapGetters, mapMutations, mapActions } from "vuex";
import pjitem from "@/components/pjitem";

export default {
  data() {
    return {
      value1: 5,
      value2: 5,
      value3: 5,
      time: this.$route.params.index,
      list: [],
    };
  },
  components: {
    Header3: Header3,
    pjitem: pjitem
  },
  computed: {
    ...mapState(["zhuantai"]),
    ...mapState(["poot"]),
    ...mapState(["user"])
  },
  methods: {
    ...mapMutations(["xg"]),

   
    chushihua() {
      this.$http
        .get(
          this.poot +
            "selectorderitemByuserandtime/" +
            this.user +
            "/" +
            this.time
        )
        .then(response => {
          console.log(response.data);
          this.list = response.data;
         
        })
        .catch(function(error) {
          console.log(error);
          alert("获取数据失败");
        });
    }
  },
  mounted() {
    this.chushihua();
  }
};
</script>
<style scoped>
.van-button {
  margin-top: 20px;
  width: 80%;
  margin-left: 20px;
  margin-right: 20px;
  margin-bottom: 50px;
}
.wjsc {
  margin-top: 10px;
}
.cd {
  text-align: right;
  font-size: 3px;
  color: rgba(56, 47, 47, 0.432);
  margin-right: 20px;
}
.divtextarea {
  margin-top: 10px;
  width: 100%;
}
textarea {
  height: 80px;
  width: 95%;
  font-size: 10px;
  color: rgba(56, 47, 47, 0.432);
}
.sppffont {
  margin-left: 15px;
  font-size: 5px;
  color: red;
}
.sppf {
  margin-left: 15px;
}
.pj {
  margin-top: 60px;
}
.div {
  margin-top: 50px;
}
.van-rate {
  text-align: left;
}
.pfdiv1 {
  margin-left: 20px;
  margin-right: 30%;
}
.pfdiv2 {
  float: left;
  font-size: 15px;
}
.ft {
  font-size: 10px;
}
.fm {
  font-size: 5px;
  float: left;
  text-align: center;
}
.fj {
  color: red;
}
.spqdfont {
  height: 50px;
  margin-left: 25%;
}
.spqdimg {
  height: 50px;
  width: 50px;
  float: left;
}
.spqddiv {
  margin-top: 15px;
  text-align: left;
  margin-left: 20px;
}
</style>